﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Gencode.Web.Common
{
    public class WebPage : System.Web.UI.Page
    {
        private const string defaultCssIdentifier = "CssName";
        private const string defaultCss = "/css/default.css";

        protected virtual string GenerateStyleSheet()
        {
            //1.try app settings
            //if (Global.Layout_MainCSS != String.Empty)
            //    return gUtil.GetVirtualPath(Global.Layout_MainCSS, false);

            //2.try cookies
            if (Context.Request.Cookies[defaultCssIdentifier] != null)
                return Context.Request.Cookies[defaultCssIdentifier].Value;
            //    return gUtil.GetVirtualPath(Context.Request.Cookies[__defaultCssIdentifier].Value, false);

            //3 default
            return defaultCss;
        }
    }
}
